<template>
  <div class="mainbox">
    <!--顶部横条-->
    <Banner></Banner>
    <!--顶部横条-->

    <mainContent catname="留言详情">
      <div slot="menu_list">
        <dl>
          <dt class="menu_dt" :style="{backgroundImage: 'url(' + menu_bg + ')'}">留言详情</dt>

          <dd v-for="(item,index) in menu_list" class="menu_dd" :class="{'hover':cur_tab ==item.id }"
              @click="onTab(item)">{{item.title}}
          </dd>

        </dl>
      </div>



      <div slot="inner_content" class="inner_content">
        <div class="page_con">
         <div class="msg_box">
           <h1>{{msgData.title}}</h1>
           <div class="msg_label"><span>{{msgData.create_at}}</span></div>
           <div class="msg_ques"><p>{{msgData.author_cont}}</p></div>
           <div class="reply">
             <p class="reply_name"><b>负责人回复:</b></p>
             <div class="reply_con">{{msgData.reply_cont}}</div>
             <div class="reply_date">回复时间：{{msgData.reply_at}}</div>
           </div>
         </div>
        </div>
      </div>
    </mainContent>

    <footerBar></footerBar>
    <!--左侧漂浮菜单-->
    <MainMenu></MainMenu>
    <!--左侧漂浮菜单-->
  </div>
</template>

<script>
  import Banner from '../../components/bannder/Banner'
  import MainMenu from '../../components/mainmenu/MainMenu'
  import footerBar from '../../components/content/footerBar'
  import mainContent from '../../components/content/mainContent'

  export default {
    name: "msg_detail",
    data() {
      return {
         msgData:{},//留言板详情
        menu_bg:''
      }
    },
    components: {
      Banner,
      MainMenu,
      footerBar,
      mainContent,
    },
    created(){
      this.menu_bg=this.$util.storage.get("menu_bg");
      this.getMessageDetail();
    },
    methods: {
      toListDetail() {
        console.log('您点击了跳转路由事件！');
        this.$router.push("/detail");
      },
      getMessageDetail(){
        console.log('this.$route.query',this.$route.query.id);
        this.$util.storage.set('message_id',this.$route.query.id);
        let mid =this.$util.storage.get('message_id');
        this.$http.get('api/ScreenkApi/getWordsDetail?id='+mid,null,r=>{
          console.log('留言板详情：',r.data);
          this.msgData=r.data;
        });

      },//获取留言详情
    },
  }
</script>

<style scoped>
  .inner_content{
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    padding-top: 60px !important;
    padding-left: 40px !important;
  }
  .page_con{
    font-size: 24px !important;
    line-height: 40px !important;
    padding-right: 20px !important;
    padding-left: 20px !important;
    width: 1300px !important;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;

  }
  .msg_box h1{
    line-height: 2;
    font-size: 30px;
  }
  .msg_label{
    padding: 20px 0;
    font-size: 22px;
    border-bottom: 2px solid #e5e5e5;
  }
  .msg_ques{
    padding: 20px 0;
    font-size: 24px;
    line-height: 2;
    color: #000;
  }
  .reply_name{
    font-size: 24px;
    padding-bottom: 10px;
  }
  .reply{
    padding: 20px;
    background: #f5f5f5;
    border: 2px dotted #ccc;
    border-radius: 8px;
  }
  .reply_con{
    line-height: 2;
    font-size: 24px;
  }
  .reply_date{
    font-size: 22px;
    text-align: right;
  }

</style>
